package com.skillworld.webapp.model.enrollment;


import java.util.List;

import com.skillworld.webapp.model.user.User;
import com.skillworld.webapp.model.util.dao.GenericDao;

import es.udc.pojo.modelutil.exceptions.InstanceNotFoundException;

public interface ExaminationDao extends GenericDao<Examination,Long>
{
	List<Examination> findByUser(Long idUser);

	Examination find(long lessonId, long userId)
	        throws InstanceNotFoundException;

	boolean finishCourse(Long idCourse);
	
	public List<Examination> listExaminations(long userId, long courseId, 
	                                            User.Role role, 
	                                            ReleasedExam.State state, 
	                                            List<Long> lessons, 
	                                            int startIndex, int count);
	public long numberOfExaminations(long userId, long courseId, 
	                                    User.Role role, 
	                                    ReleasedExam.State state,  
	                                    List<Long> lessons);
}
